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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.y: A = None
        self.r: C = None
        self.z: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.s: C = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

c = A("c")
j = B("j")
n = C("n")
k = D("k")
e = E("e")
b = F("b")
m = G("m")
h = H("h")

c.t = n
c.z = b
c.v = m
c.x = m
c.w = e
c.o = e
j.r = m
j.s = h
j.v = c
n.s = c
n.z = c
n.x = j
n.u = k
n.v = k
n.p = h
n.w = b
k.r = b
e.y = n
e.o = n
e.s = c
b.z = j
b.p = e
b.y = k
b.x = n
b.u = m
m.u = j
m.z = j
m.o = n
m.r = n
m.y = c
m.q = h
h.t = b
h.x = b
h.w = j
h.s = n
h.y = c
assert j.s.t.y.r.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: F = None
        self.v: G = None
        self.w: E = None
        self.x: G = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.y: A = None
        self.r: C = None
        self.z: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.s: C = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

c = A("c")
j = B("j")
n = C("n")
k = D("k")
e = E("e")
b = F("b")
m = G("m")
h = H("h")

c.t = n
c.z = b
c.v = m
c.x = m
c.w = e
c.o = e
j.r = m
j.s = h
j.v = c
n.s = c
n.z = c
n.x = j
n.u = k
n.v = k
n.p = h
n.w = b
k.r = b
e.y = n
e.o = n
e.s = c
b.z = j
b.p = e
b.y = k
b.x = n
b.u = m
m.u = j
m.z = j
m.o = n
m.r = n
m.y = c
m.q = h
h.t = b
h.x = b
h.w = j
h.s = n
h.y = c
assert j.s.t.y.r.y.r.txt == "b"