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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.s: F = None
        self.u: E = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.s: F = None
        self.u: E = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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

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