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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: E = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.z: G = None
        self.x: G = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: E = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.z: G = None
        self.x: G = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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