class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: B = None
        self.t: B = None
        self.x: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.txt = txt

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

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

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