class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.u: G = None
        self.x: H = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: I = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.y: C = None
        self.s: H = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: I = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: B = None
        self.y: C = None
        self.s: H = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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