class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: G = None
        self.q: G = None
        self.t: H = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.u: C = None
        self.v: E = None
        self.o: D = None
        self.x: E = None
        self.t: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.z: G = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.t: E = None
        self.z: H = None
        self.p: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

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

b = A("b")
m = B("m")
n = C("n")
f = D("f")
k = E("k")
g = F("g")
d = G("d")
l = H("l")

b.r = l
b.t = l
b.p = d
b.q = d
b.v = m
b.o = g
m.z = k
m.v = k
m.x = k
m.y = n
m.u = n
m.o = f
m.q = f
m.t = b
n.x = k
n.v = l
n.z = d
n.w = m
n.q = m
f.y = m
k.o = m
k.u = n
k.p = n
g.o = d
g.p = d
g.v = m
g.y = m
g.t = k
g.z = l
d.z = b
d.x = b
d.t = b
l.o = b
l.v = b
l.q = k
l.t = m
l.x = f
l.y = f
l.w = f
assert b.o.z.v.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: G = None
        self.q: G = None
        self.t: H = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.u: C = None
        self.v: E = None
        self.o: D = None
        self.x: E = None
        self.t: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: H = None
        self.z: G = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.t: E = None
        self.z: H = None
        self.p: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

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

b = A("b")
m = B("m")
n = C("n")
f = D("f")
k = E("k")
g = F("g")
d = G("d")
l = H("l")

b.r = l
b.t = l
b.p = d
b.q = d
b.v = m
b.o = g
m.z = k
m.v = k
m.x = k
m.y = n
m.u = n
m.o = f
m.q = f
m.t = b
n.x = k
n.v = l
n.z = d
n.w = m
n.q = m
f.y = m
k.o = m
k.u = n
k.p = n
g.o = d
g.p = d
g.v = m
g.y = m
g.t = k
g.z = l
d.z = b
d.x = b
d.t = b
l.o = b
l.v = b
l.q = k
l.t = m
l.x = f
l.y = f
l.w = f
assert b.o.z.v.o.z.txt == "l"