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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.v: C = None
        self.p: B = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.u: D = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.v: C = None
        self.p: B = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.u: D = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

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

d.w = e
d.y = e
d.x = j
d.p = l
d.q = c
m.x = d
m.v = d
m.p = d
c.x = i
c.o = i
c.u = l
l.q = c
l.v = c
l.s = g
l.p = m
l.w = m
l.z = d
b.x = d
b.z = d
b.p = g
b.u = l
b.w = l
j.y = m
j.u = c
i.x = c
i.o = c
i.u = l
e.y = m
e.u = i
g.x = d
g.z = d
g.p = b
g.u = l
g.w = l
assert j.y.p.q.o.u.s.p.u.txt == "l"