class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: D = None
        self.o: I = None
        self.y: H = None
        self.x: B = None
        self.p: D = None
        self.v: B = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: B = None
        self.v: G = None
        self.p: D = None
        self.q: A = None
        self.s: D = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: I = None
        self.z: E = None
        self.v: H = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: B = None
        self.v: G = None
        self.p: D = None
        self.q: A = None
        self.s: D = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: I = None
        self.z: E = None
        self.v: H = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.w: I = None
        self.txt = txt

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

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

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

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