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

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

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

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

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

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

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

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

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

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

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

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

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

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

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