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

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

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

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

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

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

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