class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.w: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.s: B = None
        self.t: B = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.z: F = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

c = A("c")
g = B("g")
b = C("b")
n = D("n")
m = E("m")
k = F("k")
j = F("j")
h = C("h")
f = A("f")
d = B("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.s: B = None
        self.t: B = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.z: F = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

c = A("c")
g = B("g")
b = C("b")
n = D("n")
m = E("m")
k = F("k")
j = F("j")
h = C("h")
f = A("f")
d = B("d")

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