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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: D = None
        self.x: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.y: A = None
        self.p: C = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: D = None
        self.x: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.y: A = None
        self.p: C = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

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

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

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