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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.o: A = None
        self.q: F = None
        self.u: E = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: D = None
        self.txt = txt

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

n = A("n")
c = B("c")
d = C("d")
j = D("j")
g = E("g")
b = F("b")
l = G("l")
h = E("h")

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.o: A = None
        self.q: F = None
        self.u: E = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: D = None
        self.txt = txt

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

n = A("n")
c = B("c")
d = C("d")
j = D("j")
g = E("g")
b = F("b")
l = G("l")
h = E("h")

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