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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.txt = txt

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

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