class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: A = None
        self.y: A = None
        self.s: E = None
        self.z: D = None
        self.q: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: A = None
        self.y: A = None
        self.s: E = None
        self.z: D = None
        self.q: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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