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

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

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

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

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

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

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

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

m.x = b
m.v = h
m.t = d
b.s = l
b.x = d
b.v = f
l.r = f
l.z = h
l.s = h
l.t = k
l.v = n
l.p = d
l.y = b
n.x = m
h.r = d
d.y = f
f.s = b
f.w = h
k.y = f
assert m.v.r.y.s.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

m.x = b
m.v = h
m.t = d
b.s = l
b.x = d
b.v = f
l.r = f
l.z = h
l.s = h
l.t = k
l.v = n
l.p = d
l.y = b
n.x = m
h.r = d
d.y = f
f.s = b
f.w = h
k.y = f
assert m.v.r.y.s.s.y.txt == "b"