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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: F = None
        self.u: C = None
        self.txt = txt

k = A("k")
l = B("l")
i = C("i")
d = D("d")
j = E("j")
c = F("c")
b = G("b")
n = H("n")
m = H("m")

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: F = None
        self.u: C = None
        self.txt = txt

k = A("k")
l = B("l")
i = C("i")
d = D("d")
j = E("j")
c = F("c")
b = G("b")
n = H("n")
m = H("m")

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