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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: I = None
        self.x: I = None
        self.v: A = None
        self.r: B = None
        self.p: I = None
        self.y: G = None
        self.s: G = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.t: E = None
        self.p: I = None
        self.y: C = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

n = A("n")
d = B("d")
l = C("l")
g = D("g")
b = E("b")
m = F("m")
j = G("j")
h = H("h")
e = I("e")
k = A("k")

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: I = None
        self.x: I = None
        self.v: A = None
        self.r: B = None
        self.p: I = None
        self.y: G = None
        self.s: G = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.t: E = None
        self.p: I = None
        self.y: C = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

n = A("n")
d = B("d")
l = C("l")
g = D("g")
b = E("b")
m = F("m")
j = G("j")
h = H("h")
e = I("e")
k = A("k")

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