class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: H = None
        self.z: C = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: B = None
        self.r: B = None
        self.w: C = None
        self.v: E = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: I = None
        self.t: B = None
        self.w: F = None
        self.p: D = None
        self.z: H = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: B = None
        self.r: B = None
        self.w: C = None
        self.v: E = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: I = None
        self.t: B = None
        self.w: F = None
        self.p: D = None
        self.z: H = None
        self.s: I = None
        self.txt = txt

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

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

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

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