class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: C = None
        self.r: A = None
        self.x: F = None
        self.t: B = None
        self.w: E = None
        self.v: E = None
        self.txt = txt

g = A("g")
j = B("j")
b = C("b")
n = D("n")
a = E("a")
l = F("l")
h = G("h")
d = D("d")

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: C = None
        self.r: A = None
        self.x: F = None
        self.t: B = None
        self.w: E = None
        self.v: E = None
        self.txt = txt

g = A("g")
j = B("j")
b = C("b")
n = D("n")
a = E("a")
l = F("l")
h = G("h")
d = D("d")

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