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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.s: G = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

l = A("l")
i = B("i")
n = C("n")
b = D("b")
m = E("m")
f = F("f")
e = G("e")
d = F("d")

l.o = n
l.y = e
l.w = b
i.p = e
i.o = b
i.s = b
i.z = n
i.t = m
n.z = e
n.s = e
n.u = m
n.v = l
b.z = e
b.r = l
m.q = i
f.t = n
f.z = n
f.w = l
f.v = d
e.p = n
e.u = i
e.o = m
d.t = n
d.z = n
d.w = l
d.v = f
assert l.o.v.w.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.s: G = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

l = A("l")
i = B("i")
n = C("n")
b = D("b")
m = E("m")
f = F("f")
e = G("e")
d = F("d")

l.o = n
l.y = e
l.w = b
i.p = e
i.o = b
i.s = b
i.z = n
i.t = m
n.z = e
n.s = e
n.u = m
n.v = l
b.z = e
b.r = l
m.q = i
f.t = n
f.z = n
f.w = l
f.v = d
e.p = n
e.u = i
e.o = m
d.t = n
d.z = n
d.w = l
d.v = f
assert l.o.v.w.r.w.txt == "b"