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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.o: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.o: F = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: G = None
        self.o: A = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.o: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.o: F = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: G = None
        self.o: A = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

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

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

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