class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.u: B = None
        self.y: F = None
        self.o: E = None
        self.p: A = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: B = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: C = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
n = D("n")
h = E("h")
g = F("g")
e = G("e")
f = A("f")

c.v = j
c.t = h
c.o = h
c.x = h
c.u = a
c.y = g
c.p = f
a.t = j
j.v = n
j.q = e
n.q = j
n.r = a
n.s = f
h.v = j
h.o = e
g.u = a
g.r = n
g.z = e
e.w = g
e.z = j
e.r = h
e.p = h
f.v = j
f.t = h
f.o = h
f.x = h
f.u = a
f.y = g
f.p = c
assert e.z.v.r.t.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.u: B = None
        self.y: F = None
        self.o: E = None
        self.p: A = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: B = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: C = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
n = D("n")
h = E("h")
g = F("g")
e = G("e")
f = A("f")

c.v = j
c.t = h
c.o = h
c.x = h
c.u = a
c.y = g
c.p = f
a.t = j
j.v = n
j.q = e
n.q = j
n.r = a
n.s = f
h.v = j
h.o = e
g.u = a
g.r = n
g.z = e
e.w = g
e.z = j
e.r = h
e.p = h
f.v = j
f.t = h
f.o = h
f.x = h
f.u = a
f.y = g
f.p = c
assert e.z.v.r.t.q.w.txt == "g"