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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.r: D = None
        self.o: B = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: D = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.r: D = None
        self.o: B = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: D = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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