class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: C = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: B = None
        self.z: E = None
        self.v: F = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.q: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: B = None
        self.z: E = None
        self.v: F = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.q: D = None
        self.u: D = None
        self.txt = txt

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

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

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