class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.q: C = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.v: B = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

b = A("b")
n = B("n")
m = C("m")
a = D("a")
k = E("k")
c = F("c")
g = G("g")
d = H("d")
l = G("l")
i = E("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.v: B = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

b = A("b")
n = B("n")
m = C("m")
a = D("a")
k = E("k")
c = F("c")
g = G("g")
d = H("d")
l = G("l")
i = E("i")

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