class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: I = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.x: C = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: I = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.x: C = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.txt = txt

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

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