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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.y: H = None
        self.s: B = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: H = None
        self.r: B = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.y: H = None
        self.s: B = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: H = None
        self.r: B = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: G = None
        self.txt = txt

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

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