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

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

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

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

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

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

i = A("i")
h = B("h")
m = C("m")
b = D("b")
j = E("j")
k = F("k")
f = D("f")

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

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

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

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

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

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

i = A("i")
h = B("h")
m = C("m")
b = D("b")
j = E("j")
k = F("k")
f = D("f")

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