class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: E = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: C = None
        self.p: C = None
        self.z: D = None
        self.t: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: C = None
        self.p: C = None
        self.z: D = None
        self.t: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

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

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