class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.q: H = None
        self.y: G = None
        self.w: E = None
        self.z: F = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.z: G = None
        self.x: E = None
        self.r: F = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.x: G = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: H = None
        self.s: A = None
        self.q: D = None
        self.y: A = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: F = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.r: A = None
        self.p: A = None
        self.x: H = None
        self.q: A = None
        self.t: A = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.z: G = None
        self.x: E = None
        self.r: F = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.x: G = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: H = None
        self.s: A = None
        self.q: D = None
        self.y: A = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: F = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.r: A = None
        self.p: A = None
        self.x: H = None
        self.q: A = None
        self.t: A = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

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

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