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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: F = None
        self.v: F = None
        self.y: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

a = A("a")
h = B("h")
f = C("f")
k = D("k")
j = E("j")
d = F("d")
n = G("n")
i = D("i")
b = C("b")
l = F("l")

a.y = n
a.r = f
a.z = b
h.q = b
h.z = n
f.z = j
f.y = j
f.p = l
f.v = d
f.x = d
k.x = n
k.y = n
k.z = j
k.p = h
k.t = b
k.q = f
k.r = d
j.v = a
j.z = d
j.o = h
j.x = b
d.u = n
d.t = n
d.q = n
d.p = j
d.z = j
d.o = j
d.v = h
n.q = a
i.x = n
i.y = n
i.z = j
i.p = h
i.t = f
i.q = f
i.r = d
b.z = j
b.y = j
b.p = d
b.x = d
b.v = l
l.u = n
l.t = n
l.q = n
l.p = j
l.z = j
l.o = j
l.v = h
assert d.u.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: F = None
        self.v: F = None
        self.y: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

a = A("a")
h = B("h")
f = C("f")
k = D("k")
j = E("j")
d = F("d")
n = G("n")
i = D("i")
b = C("b")
l = F("l")

a.y = n
a.r = f
a.z = b
h.q = b
h.z = n
f.z = j
f.y = j
f.p = l
f.v = d
f.x = d
k.x = n
k.y = n
k.z = j
k.p = h
k.t = b
k.q = f
k.r = d
j.v = a
j.z = d
j.o = h
j.x = b
d.u = n
d.t = n
d.q = n
d.p = j
d.z = j
d.o = j
d.v = h
n.q = a
i.x = n
i.y = n
i.z = j
i.p = h
i.t = f
i.q = f
i.r = d
b.z = j
b.y = j
b.p = d
b.x = d
b.v = l
l.u = n
l.t = n
l.q = n
l.p = j
l.z = j
l.o = j
l.v = h
assert d.u.q.z.txt == "b"