class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: E = None
        self.u: F = None
        self.q: E = None
        self.s: H = None
        self.t: E = None
        self.v: E = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.y: B = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: D = None
        self.q: B = None
        self.o: B = None
        self.t: G = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.t: G = None
        self.r: C = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

g = A("g")
n = B("n")
b = C("b")
d = D("d")
h = E("h")
i = F("i")
f = G("f")
e = H("e")
j = G("j")
c = A("c")

g.y = d
g.u = d
g.t = j
g.x = c
n.t = b
n.z = c
n.v = i
b.z = i
b.u = i
b.w = h
b.q = h
b.t = h
b.v = h
b.s = e
b.x = e
d.q = h
d.s = j
d.y = n
d.t = e
h.o = n
h.y = n
h.z = n
h.u = b
h.w = i
h.p = e
h.x = c
i.u = n
i.q = n
i.o = n
i.x = d
i.z = d
i.w = d
i.t = j
f.x = j
f.t = j
f.u = e
f.r = b
f.o = c
e.t = b
e.u = i
e.o = c
e.x = c
j.x = f
j.t = f
j.u = e
j.r = b
j.o = c
c.y = d
c.u = d
c.t = f
c.x = g
assert g.t.u.o.x.x.x.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: E = None
        self.u: F = None
        self.q: E = None
        self.s: H = None
        self.t: E = None
        self.v: E = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.y: B = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: D = None
        self.q: B = None
        self.o: B = None
        self.t: G = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.t: G = None
        self.r: C = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

g = A("g")
n = B("n")
b = C("b")
d = D("d")
h = E("h")
i = F("i")
f = G("f")
e = H("e")
j = G("j")
c = A("c")

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