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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: B = None
        self.v: A = None
        self.r: G = None
        self.y: D = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: G = None
        self.p: F = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.z: D = None
        self.r: A = None
        self.txt = txt

k = A("k")
a = B("a")
h = C("h")
l = D("l")
m = E("m")
d = F("d")
c = G("c")
g = F("g")
e = E("e")

k.y = c
k.p = g
k.z = h
k.q = l
a.u = g
a.q = l
h.t = a
h.o = a
h.z = a
h.v = k
h.r = c
h.y = l
l.o = d
l.u = c
m.q = l
m.w = l
m.y = c
m.v = c
d.u = g
d.p = g
d.r = c
d.z = h
c.s = l
c.z = l
c.t = a
c.r = k
g.u = d
g.p = d
g.r = c
g.z = h
e.q = l
e.w = l
e.y = c
e.v = c
assert d.r.t.u.z.r.r.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: F = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: B = None
        self.v: A = None
        self.r: G = None
        self.y: D = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: G = None
        self.p: F = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.z: D = None
        self.r: A = None
        self.txt = txt

k = A("k")
a = B("a")
h = C("h")
l = D("l")
m = E("m")
d = F("d")
c = G("c")
g = F("g")
e = E("e")

k.y = c
k.p = g
k.z = h
k.q = l
a.u = g
a.q = l
h.t = a
h.o = a
h.z = a
h.v = k
h.r = c
h.y = l
l.o = d
l.u = c
m.q = l
m.w = l
m.y = c
m.v = c
d.u = g
d.p = g
d.r = c
d.z = h
c.s = l
c.z = l
c.t = a
c.r = k
g.u = d
g.p = d
g.r = c
g.z = h
e.q = l
e.w = l
e.y = c
e.v = c
assert d.r.t.u.z.r.r.z.v.txt == "k"