class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: D = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: B = None
        self.s: H = None
        self.o: F = None
        self.t: G = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.v: E = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.p: D = None
        self.v: C = None
        self.y: A = None
        self.t: I = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: F = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: D = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: B = None
        self.s: H = None
        self.o: F = None
        self.t: G = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.v: E = None
        self.r: E = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.p: D = None
        self.v: C = None
        self.y: A = None
        self.t: I = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: F = None
        self.y: I = None
        self.txt = txt

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

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

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