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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: I = None
        self.v: D = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.t: I = None
        self.q: H = None
        self.r: C = None
        self.w: A = None
        self.x: H = None
        self.z: H = None
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: I = None
        self.v: D = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.t: I = None
        self.q: H = None
        self.r: C = None
        self.w: A = None
        self.x: H = None
        self.z: H = None
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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