class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: G = None
        self.u: G = None
        self.q: B = None
        self.w: H = None
        self.t: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: D = None
        self.o: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.x: C = None
        self.u: B = None
        self.q: B = None
        self.txt = txt

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

l = A("l")
n = B("n")
m = C("m")
g = D("g")
f = E("f")
c = F("c")
b = G("b")
e = H("e")
i = G("i")

l.t = n
l.x = m
l.p = m
n.v = i
m.v = g
m.o = b
m.u = i
m.q = n
m.t = n
m.w = e
m.x = c
g.w = n
f.x = e
f.p = g
f.y = b
f.q = m
f.z = m
c.w = e
c.r = g
c.q = g
c.o = m
b.y = l
b.w = l
b.x = m
b.u = n
b.q = n
e.t = f
e.r = c
e.s = c
e.y = c
e.v = n
e.o = l
e.x = l
e.q = b
i.y = l
i.w = l
i.x = m
i.u = n
i.q = n
assert i.y.t.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: G = None
        self.u: G = None
        self.q: B = None
        self.w: H = None
        self.t: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: D = None
        self.o: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.x: C = None
        self.u: B = None
        self.q: B = None
        self.txt = txt

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

l = A("l")
n = B("n")
m = C("m")
g = D("g")
f = E("f")
c = F("c")
b = G("b")
e = H("e")
i = G("i")

l.t = n
l.x = m
l.p = m
n.v = i
m.v = g
m.o = b
m.u = i
m.q = n
m.t = n
m.w = e
m.x = c
g.w = n
f.x = e
f.p = g
f.y = b
f.q = m
f.z = m
c.w = e
c.r = g
c.q = g
c.o = m
b.y = l
b.w = l
b.x = m
b.u = n
b.q = n
e.t = f
e.r = c
e.s = c
e.y = c
e.v = n
e.o = l
e.x = l
e.q = b
i.y = l
i.w = l
i.x = m
i.u = n
i.q = n
assert i.y.t.v.u.txt == "n"