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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.r: A = None
        self.u: A = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: H = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.o: F = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.w: B = None
        self.y: G = None
        self.q: A = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.z: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: E = None
        self.w: E = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

j = A("j")
h = B("h")
n = C("n")
g = D("g")
i = E("i")
f = F("f")
b = G("b")
c = H("c")
m = F("m")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.r: A = None
        self.u: A = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: H = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.o: F = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.w: B = None
        self.y: G = None
        self.q: A = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.z: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: E = None
        self.w: E = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

j = A("j")
h = B("h")
n = C("n")
g = D("g")
i = E("i")
f = F("f")
b = G("b")
c = H("c")
m = F("m")

j.x = n
j.t = c
h.t = g
h.o = g
h.y = i
h.r = j
h.u = j
n.z = b
n.w = b
n.q = b
n.s = c
n.r = f
g.v = c
g.t = f
g.o = m
g.w = b
i.p = g
f.r = i
f.u = i
f.p = i
f.w = h
f.y = b
f.q = j
b.v = c
b.z = c
b.x = j
b.r = g
c.r = b
c.s = i
c.w = i
c.o = i
c.y = g
m.r = i
m.u = i
m.p = i
m.w = h
m.y = b
m.q = j
assert i.p.w.x.t.y.t.p.txt == "i"