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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: B = None
        self.y: B = None
        self.q: D = None
        self.x: C = None
        self.w: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: B = None
        self.y: B = None
        self.q: D = None
        self.x: C = None
        self.w: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

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