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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.r: D = None
        self.v: D = None
        self.p: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.r: D = None
        self.v: D = None
        self.p: A = None
        self.o: A = None
        self.txt = txt

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

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