class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.r: C = None
        self.q: E = None
        self.y: D = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.v: B = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: G = None
        self.s: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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

c.z = g
c.r = g
c.p = f
c.y = f
c.q = b
c.s = l
a.y = f
a.u = c
a.v = h
a.s = l
g.q = c
g.t = c
f.r = l
f.w = l
f.s = g
f.z = a
b.w = d
b.x = d
b.s = g
b.t = a
b.q = a
b.u = l
d.t = f
l.r = g
l.y = b
l.p = b
l.s = h
h.y = f
h.u = c
h.v = a
h.s = l
assert d.t.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.r: C = None
        self.q: E = None
        self.y: D = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.v: B = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: G = None
        self.s: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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

c.z = g
c.r = g
c.p = f
c.y = f
c.q = b
c.s = l
a.y = f
a.u = c
a.v = h
a.s = l
g.q = c
g.t = c
f.r = l
f.w = l
f.s = g
f.z = a
b.w = d
b.x = d
b.s = g
b.t = a
b.q = a
b.u = l
d.t = f
l.r = g
l.y = b
l.p = b
l.s = h
h.y = f
h.u = c
h.v = a
h.s = l
assert d.t.s.t.txt == "c"