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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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