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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.r: A = None
        self.y: A = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.r: G = None
        self.s: B = None
        self.p: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.p: A = None
        self.y: B = None
        self.z: E = None
        self.r: B = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
h = D("h")
g = E("g")
e = F("e")
d = G("d")
f = F("f")

l.w = i
l.x = i
j.t = d
j.p = d
j.x = f
j.r = l
j.y = l
i.y = f
i.w = j
i.s = j
i.r = d
i.p = e
h.z = i
h.y = i
h.v = l
h.x = d
h.t = d
h.p = e
g.r = f
g.p = e
e.v = i
d.x = j
d.y = j
d.r = j
d.u = h
d.p = l
d.z = g
f.v = i
assert f.v.r.p.x.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.r: A = None
        self.y: A = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.r: G = None
        self.s: B = None
        self.p: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.p: A = None
        self.y: B = None
        self.z: E = None
        self.r: B = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
h = D("h")
g = E("g")
e = F("e")
d = G("d")
f = F("f")

l.w = i
l.x = i
j.t = d
j.p = d
j.x = f
j.r = l
j.y = l
i.y = f
i.w = j
i.s = j
i.r = d
i.p = e
h.z = i
h.y = i
h.v = l
h.x = d
h.t = d
h.p = e
g.r = f
g.p = e
e.v = i
d.x = j
d.y = j
d.r = j
d.u = h
d.p = l
d.z = g
f.v = i
assert f.v.r.p.x.s.x.txt == "f"