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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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