class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: H = None
        self.s: B = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.p: H = None
        self.z: H = None
        self.w: A = None
        self.v: H = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.t: B = None
        self.y: D = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.p: H = None
        self.z: H = None
        self.w: A = None
        self.v: H = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.t: B = None
        self.y: D = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

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

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

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