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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.s: C = None
        self.v: F = None
        self.r: E = None
        self.t: C = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.s: C = None
        self.v: F = None
        self.r: E = None
        self.t: C = None
        self.o: F = None
        self.txt = txt

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

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