class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: E = None
        self.r: F = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.q: E = None
        self.p: F = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

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

h.w = c
h.y = e
h.r = d
h.t = k
l.t = c
l.p = k
l.v = h
f.r = g
f.o = d
f.t = d
f.q = h
f.v = c
f.y = e
c.z = e
c.p = f
e.w = f
d.s = f
g.u = j
g.w = j
g.q = e
g.p = d
g.t = l
g.y = f
k.t = c
k.p = l
k.v = h
j.u = g
j.w = g
j.q = e
j.p = d
j.t = k
j.y = f
assert l.p.v.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: E = None
        self.r: F = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.q: E = None
        self.p: F = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

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

h.w = c
h.y = e
h.r = d
h.t = k
l.t = c
l.p = k
l.v = h
f.r = g
f.o = d
f.t = d
f.q = h
f.v = c
f.y = e
c.z = e
c.p = f
e.w = f
d.s = f
g.u = j
g.w = j
g.q = e
g.p = d
g.t = l
g.y = f
k.t = c
k.p = l
k.v = h
j.u = g
j.w = g
j.q = e
j.p = d
j.t = k
j.y = f
assert l.p.v.y.w.txt == "f"