class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: C = None
        self.w: B = None
        self.r: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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