class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: A = None
        self.y: G = None
        self.u: E = None
        self.v: F = None
        self.txt = txt

c = A("c")
m = B("m")
n = C("n")
h = D("h")
i = E("i")
l = F("l")
j = G("j")
e = B("e")
k = G("k")
g = A("g")

c.v = l
c.r = i
c.t = i
c.w = h
m.v = l
n.u = i
h.u = g
h.r = g
h.t = n
i.r = n
i.x = m
l.y = k
j.z = c
j.w = g
j.y = k
j.u = i
j.v = l
e.v = l
k.z = g
k.w = g
k.y = j
k.u = i
k.v = l
g.v = l
g.r = i
g.t = i
g.w = h
assert l.y.y.v.y.y.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: A = None
        self.y: G = None
        self.u: E = None
        self.v: F = None
        self.txt = txt

c = A("c")
m = B("m")
n = C("n")
h = D("h")
i = E("i")
l = F("l")
j = G("j")
e = B("e")
k = G("k")
g = A("g")

c.v = l
c.r = i
c.t = i
c.w = h
m.v = l
n.u = i
h.u = g
h.r = g
h.t = n
i.r = n
i.x = m
l.y = k
j.z = c
j.w = g
j.y = k
j.u = i
j.v = l
e.v = l
k.z = g
k.w = g
k.y = j
k.u = i
k.v = l
g.v = l
g.r = i
g.t = i
g.w = h
assert l.y.y.v.y.y.z.v.txt == "l"