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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: A = None
        self.p: I = None
        self.y: B = None
        self.o: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.s: E = None
        self.y: D = None
        self.z: A = None
        self.w: E = None
        self.v: E = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: A = None
        self.p: I = None
        self.y: B = None
        self.o: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.s: E = None
        self.y: D = None
        self.z: A = None
        self.w: E = None
        self.v: E = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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