class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: E = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: E = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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