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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: H = None
        self.o: C = None
        self.z: E = None
        self.u: I = None
        self.v: H = None
        self.x: A = None
        self.q: I = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.o: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: H = None
        self.o: C = None
        self.z: E = None
        self.u: I = None
        self.v: H = None
        self.x: A = None
        self.q: I = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.o: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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