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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: H = None
        self.p: G = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: G = None
        self.s: D = None
        self.o: G = None
        self.p: H = None
        self.x: G = None
        self.txt = txt

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

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

g = A("g")
f = B("f")
k = C("k")
m = D("m")
b = E("b")
a = F("a")
n = G("n")
h = H("h")
l = C("l")

g.x = a
g.z = h
g.u = h
g.q = l
g.y = k
g.s = k
g.t = n
g.v = m
f.u = g
f.v = g
k.u = n
m.y = h
m.o = h
m.p = n
m.v = g
b.v = f
b.x = f
b.p = n
b.y = g
b.t = m
a.y = f
a.v = n
a.o = n
a.x = n
a.s = m
a.p = h
n.r = f
n.x = a
h.u = b
l.u = n
assert l.u.x.s.v.q.u.r.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: H = None
        self.q: C = None
        self.u: H = None
        self.y: C = None
        self.s: C = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: H = None
        self.p: G = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: G = None
        self.s: D = None
        self.o: G = None
        self.p: H = None
        self.x: G = None
        self.txt = txt

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

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

g = A("g")
f = B("f")
k = C("k")
m = D("m")
b = E("b")
a = F("a")
n = G("n")
h = H("h")
l = C("l")

g.x = a
g.z = h
g.u = h
g.q = l
g.y = k
g.s = k
g.t = n
g.v = m
f.u = g
f.v = g
k.u = n
m.y = h
m.o = h
m.p = n
m.v = g
b.v = f
b.x = f
b.p = n
b.y = g
b.t = m
a.y = f
a.v = n
a.o = n
a.x = n
a.s = m
a.p = h
n.r = f
n.x = a
h.u = b
l.u = n
assert l.u.x.s.v.q.u.r.u.u.txt == "h"