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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: D = None
        self.y: D = None
        self.p: H = None
        self.w: E = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: H = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: D = None
        self.y: D = None
        self.p: H = None
        self.w: E = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: H = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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