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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.q: E = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.y: F = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: E = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

g = A("g")
h = B("h")
f = C("f")
i = D("i")
c = E("c")
d = F("d")
k = D("k")
n = B("n")
b = E("b")
l = C("l")

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.q: E = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.y: F = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: E = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

g = A("g")
h = B("h")
f = C("f")
i = D("i")
c = E("c")
d = F("d")
k = D("k")
n = B("n")
b = E("b")
l = C("l")

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