class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.w: H = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.p: H = None
        self.y: E = None
        self.v: H = None
        self.s: B = None
        self.r: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: G = None
        self.z: C = None
        self.t: B = None
        self.u: H = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
l = C("l")
g = D("g")
h = E("h")
n = F("n")
i = G("i")
m = H("m")
k = E("k")

c.o = n
c.t = n
c.y = j
j.u = l
j.v = n
j.w = m
j.r = h
l.t = j
l.s = j
l.r = j
l.z = c
l.u = c
l.p = m
l.v = m
l.y = h
g.p = j
h.v = j
h.x = j
n.s = c
n.q = i
n.z = l
n.t = j
n.u = m
i.v = j
m.p = n
m.t = k
m.o = i
m.r = i
m.w = l
m.z = g
m.y = j
m.s = c
k.v = j
k.x = j
assert j.w.t.v.v.q.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.w: H = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.p: H = None
        self.y: E = None
        self.v: H = None
        self.s: B = None
        self.r: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: G = None
        self.z: C = None
        self.t: B = None
        self.u: H = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
l = C("l")
g = D("g")
h = E("h")
n = F("n")
i = G("i")
m = H("m")
k = E("k")

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