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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: A = None
        self.u: H = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: F = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.r: A = None
        self.q: A = None
        self.x: C = None
        self.v: F = None
        self.z: E = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: D = None
        self.txt = txt

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

b = A("b")
c = B("c")
k = C("k")
f = D("f")
i = E("i")
g = F("g")
l = G("l")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: A = None
        self.u: H = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: F = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.r: A = None
        self.q: A = None
        self.x: C = None
        self.v: F = None
        self.z: E = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: D = None
        self.txt = txt

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

b = A("b")
c = B("c")
k = C("k")
f = D("f")
i = E("i")
g = F("g")
l = G("l")
j = H("j")

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