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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.s: B = None
        self.v: D = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

i = A("i")
c = B("c")
d = C("d")
h = D("h")
j = E("j")
k = F("k")
e = D("e")
m = E("m")
b = A("b")
g = E("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.s: B = None
        self.v: D = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

i = A("i")
c = B("c")
d = C("d")
h = D("h")
j = E("j")
k = F("k")
e = D("e")
m = E("m")
b = A("b")
g = E("g")

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