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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

h = A("h")
m = B("m")
f = C("f")
k = D("k")
l = E("l")
j = F("j")
d = A("d")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

h = A("h")
m = B("m")
f = C("f")
k = D("k")
l = E("l")
j = F("j")
d = A("d")

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