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

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

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

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

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

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

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

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

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

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

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

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

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

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

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