class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

c = A("c")
i = B("i")
m = C("m")
d = D("d")
l = E("l")
j = F("j")
a = E("a")
n = D("n")
f = F("f")

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

c = A("c")
i = B("i")
m = C("m")
d = D("d")
l = E("l")
j = F("j")
a = E("a")
n = D("n")
f = F("f")

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