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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.p: F = None
        self.r: F = None
        self.x: C = None
        self.o: C = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: E = None
        self.q: F = None
        self.y: D = None
        self.v: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: F = None
        self.u: D = None
        self.txt = txt

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

k.w = h
k.r = h
k.x = m
l.s = m
l.r = c
l.x = b
c.s = m
c.t = d
a.s = b
a.t = b
a.v = b
a.q = f
b.v = k
b.s = f
b.p = h
b.r = h
b.x = c
b.o = c
b.w = a
b.y = a
h.x = a
d.s = h
d.q = h
d.p = b
d.y = a
d.v = m
d.w = c
m.y = h
m.r = h
m.u = a
f.s = m
f.r = c
f.x = b
assert l.r.t.p.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: F = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.p: F = None
        self.r: F = None
        self.x: C = None
        self.o: C = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: E = None
        self.q: F = None
        self.y: D = None
        self.v: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: F = None
        self.u: D = None
        self.txt = txt

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

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