class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.w: E = None
        self.x: F = None
        self.t: F = None
        self.u: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.u: I = None
        self.z: H = None
        self.v: H = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: I = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

f.q = g
f.z = k
g.v = d
g.p = d
g.x = j
g.t = b
g.r = k
g.w = k
g.u = c
e.y = a
e.w = a
e.o = d
e.x = d
e.t = d
e.u = f
e.z = b
c.u = h
a.y = h
a.z = c
a.t = f
d.p = e
d.o = f
d.u = j
d.z = h
d.v = h
d.q = b
b.x = e
b.r = j
b.t = g
h.s = d
j.y = c
j.u = c
j.v = h
j.t = h
j.s = h
j.r = h
j.x = b
k.v = d
k.p = d
k.x = j
k.t = b
k.r = g
k.w = g
k.u = c
assert d.o.q.x.s.s.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.w: E = None
        self.x: F = None
        self.t: F = None
        self.u: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.u: I = None
        self.z: H = None
        self.v: H = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: I = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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