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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: C = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

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

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

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

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

b.z = l
b.o = g
b.v = a
l.o = g
l.y = f
l.t = m
l.s = j
f.p = l
f.v = a
f.s = m
j.t = f
j.z = f
j.y = a
j.v = g
m.o = a
m.u = j
m.r = f
m.z = g
m.q = g
a.y = l
g.x = l
g.t = m
assert l.o.t.u.y.y.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: C = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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