class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: F = None
        self.q: E = None
        self.v: H = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
j = C("j")
l = D("l")
e = E("e")
a = F("a")
g = G("g")
c = H("c")
f = F("f")
m = F("m")

k.o = f
k.v = c
k.q = e
b.p = c
b.v = j
b.y = g
j.p = l
j.w = l
j.y = b
j.o = b
l.x = a
e.p = k
a.z = e
a.q = e
a.u = m
a.v = c
g.v = m
g.s = b
c.q = b
c.r = l
c.p = m
f.z = e
f.q = e
f.u = a
f.v = c
m.z = e
m.q = e
m.u = f
m.v = c
assert a.u.v.q.y.s.p.q.y.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: F = None
        self.q: E = None
        self.v: H = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
j = C("j")
l = D("l")
e = E("e")
a = F("a")
g = G("g")
c = H("c")
f = F("f")
m = F("m")

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